﻿<UserControl x:Class="IsolatedStorageExplorerClient.UI.ExplorerWindow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:converters="clr-namespace:IsolatedStorageExplorerClient.UI.Resources.Converters"
             mc:Ignorable="d"
             d:DesignHeight="300"
             d:DesignWidth="300">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid x:Name="HeaderGrid"
              Grid.Row="0"
              Height="55"
              Background="#FFBCC7D8">
            <Grid x:Name="applicationSelectionGrid"
                  Margin="10">
                <ComboBox x:Name="applicationCombo"
                          Height="33"
                          ItemsSource="{Binding}">
                    <ComboBox.Resources>
                        <converters:ImageSourceByDeviceType x:Key="deviceImage" />
                    </ComboBox.Resources>
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <Grid DataContext="{Binding Path=ApplicationInformation}"
                                  Width="Auto">
                                <Grid.ColumnDefinitions>

                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>

                                <StackPanel HorizontalAlignment="Left"
                                            Width="Auto"
                                            Orientation="Horizontal">
                                    <Label Content="{Binding Path=ApplicationName}"
                                           HorizontalAlignment="Left"
                                           FontWeight="Bold" />
                                    
                                    <Label Content="{Binding Version}"
                                           Margin="0,0,0,0" />

                                    <Image Height="18"
                                           HorizontalAlignment="Left"
                                           StretchDirection="DownOnly"
                                           Source="{Binding DeviceType, Converter={StaticResource deviceImage}}"
                                           Margin="5,0,0,0" />

                                    <Label Content="{Binding DeviceName}"
                                           HorizontalAlignment="Left"
                                           Margin="2,0,0,0" />

                                </StackPanel>
                            </Grid>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>

                </ComboBox>
            </Grid>

        </Grid>
        <ScrollViewer x:Name="contentScrollviewer"
                      Grid.Row="1"
                      VerticalScrollBarVisibility="Auto"
                      HorizontalScrollBarVisibility="Auto">


        </ScrollViewer>

    </Grid>
</UserControl>
